package com.bolt.convention.exception;

import com.bolt.common.utils.ExceptionUtil;
import com.bolt.common.utils.StrUtil;

public class DataAccessException extends RuntimeException {
    public DataAccessException(Throwable e) {
        super(ExceptionUtil.getMessage(e), e);
    }

    public DataAccessException(String message) {
        super(message);
    }

    public DataAccessException(String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params));
    }

    public DataAccessException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public DataAccessException(Throwable throwable, String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params), throwable);
    }
}